package cn.jly.flink.custom_source;

import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

/**
 * @author lanyangji
 * @create 2020-09-01 16:35
 */
public class CustomSourceApp {
    public static void main(String[] args) throws Exception {
        StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();

        env.addSource(new MyStreamingSource()).setParallelism(1)
                .print().setParallelism(1);

        env.execute("user defined streaming source");
    }
}
